package backend.project.gym_management.mapper;

import backend.project.gym_management.pojo.dto.UserHealData;
import backend.project.gym_management.pojo.dto.UserSelectCourseParam;
import backend.project.gym_management.pojo.vo.*;
import backend.project.gym_management.pojo.entity.PayOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserOperationMapper {

    List<UserCourseListVO> listCoursesByUid(Long uid);

    UserCourseDetailVO getCourseDetail(Long cid);

    int selectCourse(UserSelectCourseParam param);

    // 新增的方法，用于查询选课后的课程信息
   UserEnrollmentInfoVO getSelectedCourseInfo(@Param("cid") Long cid, @Param("uid")Long uid);
    // 根据 uid 查询健康数据
    UserHealthDataVO getHealthDataByUid(Long uid);

    UserDetailsVO getUserDetails(Long uid);

    int insertHealthData(UserHealData healthData);

    int updateHealthData(UserHealData healthData);

    int insertOrder(PayOrder payOrder);

    Long selectOid(@Param("uid")Long uid,@Param("cid")Long cid);

    List<PayOrder> selectOrder(Long uid);
}
